# makefile to assist in development and release of cvsxxdiff.
#
# Written by Michalis Giannakidis as part of the cvsxxdiff distribution
#
# TODO: replace it with setup.py (?)


PROJECT_FILES = \
COPYING \
INSTALL \
Makefile \
README \
VERSION \
Changelog \
cvsxxdiff \
cvsnup \
cvscommit \
setup.py


VERSION = $(shell cat VERSION)

.PHONY: release
release:
	mkdir -p cvsxxdiff-$(VERSION)
	cp $(PROJECT_FILES) cvsxxdiff-$(VERSION)
	mkdir -p cvsxxdiff-$(VERSION)/man/man1
	cp man/man1/*.1 cvsxxdiff-$(VERSION)/man/man1
	for i in $$( ls -1 cvsxxdiff-$(VERSION)/man/man1/*.1 ); do \
		gzip -f9 $$i; \
	done
	tar fczv cvsxxdiff-$(VERSION).tar.gz cvsxxdiff-$(VERSION)
